import 'package:flutter/material.dart';

class NewsPage extends StatefulWidget {
  final String content;

  const NewsPage({super.key, required this.content});

  @override
  State<NewsPage> createState() => _NewsPageState();
}

class _NewsPageState extends State<NewsPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("我是新闻"),
      ),
      body: Center(
        child: Text(widget.content),
      ),
      floatingActionButton: OutlinedButton(
        style: ButtonStyle(
            backgroundColor: MaterialStateProperty.all(Colors.lightBlue),
            foregroundColor: MaterialStateProperty.all(Colors.white),
            shape: MaterialStateProperty.all(
                const CircleBorder(side: BorderSide(color: Colors.lightBlue))
            )
        ),
        onPressed: () {
          Navigator.pop(context);
        },
        child: const SizedBox(
          width: 60,
          height: 60,
          child: Icon(Icons.arrow_back),
        ),
      ),
    );
  }
}
